<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="renderer" content="webkit">
    <title>修改班级</title>
    <base href="<%=request.getContextPath()+"/"%>">
    <link rel="stylesheet" href="css/pintuer.css">
    <link rel="stylesheet" href="css/admin.css">
    <script src="js/jquery.js"></script>
    <script src="js/pintuer.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#btn").click(function () {
                // 发送ajax请求
                var data = $('form').serialize() + "&method=updateOneClass";
                $.post("/sms/offlineSchool/classServlet.do", data, function (res) {
                    if (res == 1) {
                        alert("修改班级信息成功!")
                    } else {
                        alert("修改班级信息失败!")
                    }
                })
            })
        })
    </script>
</head>
<body>
<div class="panel admin-panel">
    <div class="panel-head"><strong><span class="icon-pencil-square-o"></span>修改班级</strong></div>
    <div class="body-content">
        <form method="post" class="form-x" action="">
            <input type="hidden" name="cid" value="${requestScope.oneClass.cid}" style="width:30%"/>
            <div class="form-group">
                <div class="label">
                    <label>班级名称：</label>
                </div>
                <div class="field">
                    <input type="text" class="input" name="cname" value="${requestScope.oneClass.cname}"
                           style="width:30%"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>班级位置：</label>
                </div>
                <div class="field">
                    <input type="text" class="input" name="cloc" value="${requestScope.oneClass.clocation}"
                           style="width:30%"/>
                </div>
            </div>

            <div class="form-group">
                <div class="label">
                    <label>班级描述：</label>
                </div>
                <div class="field">
                    <textarea type="text" class="input" name="cdesc"
                              style="height:80px;">${requestScope.oneClass.desc}</textarea>
                </div>
            </div>

            <div class="form-group">
                <div class="label">
                    <label></label>
                </div>
                <div class="field">
                    <button id="btn" class="button bg-main icon-check-square-o" type="button"> 修改</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>